package com.cw.action;

import java.awt.event.ActionEvent;
import java.beans.PropertyVetoException;

import javax.swing.AbstractAction;
import javax.swing.Icon;
import javax.swing.JInternalFrame;

public class OpenInterAction extends AbstractAction {
	JInternalFrame target;

	public OpenInterAction() {
		super();
	}

	public OpenInterAction(String name) {
		super(name);
	}

	public OpenInterAction(String name, Icon icon, JInternalFrame tar) {
		super(name, icon);
		target = tar;
	}

	/**
	 * Invoked when an action occurs.
	 * 
	 * @param e
	 *            ActionEvent
	 * @todo Implement this java.awt.event.ActionListener method
	 */
	public void actionPerformed(ActionEvent e) {
		try {
			target.setVisible(true);
			target.setSelected(true);

		} catch (PropertyVetoException ex) {
		}
	}
}
